import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as echarts from 'echarts'
const $ = require('jquery');
window.$ = $;


// 统一导入el-icon图标
import * as Icons from "@element-plus/icons-vue"; //导入所有element icon图标
Object.keys(Icons).forEach((key) => {
    createApp(App).component(key, Icons[key]); // JS中用这行
    // app.component(key, Icons[key as keyof typeof Icons]);// TS中用这行
});

// 全局样式
// import './styles/index.css'


createApp(App)
    .use(store)
    .use(router)
    .use(echarts)
    .use(ElementPlus, {
        locale: zhCn,
    })
    .mount('#app')
